package com.youngjun.user.api.admin;

import com.youngjun.common.mybatis.web.Response;
import com.youngjun.user.pojo.dto.FunctionInterfaceDTO;
import com.youngjun.user.pojo.dto.query.InterfaceQueryDTO;
import com.youngjun.user.pojo.vo.InterfaceVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.BindException;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import javax.validation.Valid;
import java.util.List;

@Api(tags = "功能与接口关系管理")
@FeignClient(
        name = "${ums.api.name:ums-service}",
        contextId = "functionInterfaceRestApi",
        url  = "${ums.api.url:http://127.0.0.1:8080}",
        path = "/function_interface"
)
public interface IFunctionInterfaceRestApi {

    @ApiOperation(value="创建功能与接口关系")
    @RequestMapping(value = "/create",method = RequestMethod.POST)
    Response<Void> create(@RequestBody @Valid FunctionInterfaceDTO dto);

    @ApiOperation(value="删除功能与接口关系")
    @RequestMapping(value = "/delete",method = RequestMethod.DELETE)
    Response<Void> delete(@RequestParam Long functionId,@RequestParam Long interfaceId);


}